package pl.wr.physics.units.others;

import pl.wr.math.number.Fraction;
import pl.wr.physics.units.AbstractUnit;
import pl.wr.physics.units.SI.Prefix;
import pl.wr.physics.units.SI.base.m;

/**
 * Length
 * 
 * @version 1.0
 * @author wieslaw.rodak
 * 
 */
public final class Å extends AbstractUnit implements OtherUnit {

	public static final String symbol = "l, x, λ";

	/**
	 * The SI value of a unit = 1 × 10<sup>-10</sup> m
	 */
	public static final m UNIT_SI = new m(Prefix.p, 100);

	/**
	 * angstrom - Å
	 * 
	 * @param value
	 *            in <code>int</code>
	 */
	public Å(int value) {
		this(Prefix.basic, value);
	}

	/**
	 * angstrom - Å
	 * 
	 * @param value
	 *            in <code>float</code>
	 */
	public Å(float value) {
		this(Prefix.basic, value);
	}

	/**
	 * angstrom - Å
	 * 
	 * @param value
	 *            in <code>Fraction</code>
	 */
	public Å(Fraction value) {
		this(Prefix.basic, value);
	}

	/**
	 * angstrom - Å
	 * 
	 * @param p
	 *            - prefix SI
	 * @param value
	 *            - value in <code>int</code>
	 */
	public Å(Prefix p, int value) {
		super(p, value, Å.class.getSimpleName());
	}

	/**
	 * angstrom - Å
	 * 
	 * @param p
	 *            - prefix SI
	 * @param value
	 *            - value in <code>float</code>
	 */
	public Å(Prefix p, float value) {
		super(p, value, Å.class.getSimpleName());
	}

	/**
	 * angstrom - Å
	 * 
	 * @param p
	 *            - prefix SI
	 * @param value
	 *            - value in <code>Fraction</code>
	 */
	public Å(Prefix p, Fraction value) {
		super(p, value, Å.class.getSimpleName());
	}

	@Override
	public m getSIValue() {
		return new m(Fraction.multiply(this.getValue(), UNIT_SI.getValue()));
	}
}
